<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>省市级联 Demo</title>
</head>
<body>
<h4>请不要通过file://协议访问（直接双击文件访问），否则存在跨域无法获取数据</h4>
<div id="region-cascade">
  <select>
    <option value=''>请选择省份</option>
  </select>
  <select>
    <option value=''>请选择城市</option>
  </select>
  <select>
    <option value=''>请选择县</option>
  </select>
  <!--
  <select>
    <option value=''>请选择镇</option>
  </select>
  <select>
    <option value=''>请选择村</option>
  </select>
  -->
</div>

<script src="js/region-cascade.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
  var url = 'data/data.json';
  var element = document.getElementById('region-cascade');
  window.onload = setRegionData(url, element);
</script>
</body>
</html>
